package com.naiterui.ehp.bp.domain;
// default package

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * DocLogin entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "dr_login")
public class Login implements java.io.Serializable {

    // Fields

    /**
     *
     */
    private static final long serialVersionUID = 8964255564605284096L;
    private Long id;
    private String phoneNum;
    private String password;
    private String inviterCode;
    private int type;
    private Long relationId;
    private String salt;
    private String recommCode;
    private Date lastLoginTime;
    private String token;
    private String createdBy;
    private Date createdAt;
    private String changedBy;
    private Date changedAt;
    private int regType;
    private String deviceSN;
    private String model;
    private String ip;
    private String loginAddr;
    private Date lastPwdModify;

    // Constructors

    /**
     * default constructor
     */
    public Login() {
    }

    /**
     * minimal constructor
     */
    public Login(String phoneNum, String password, Long relationId) {
        this.phoneNum = phoneNum;
        this.password = password;
        this.relationId = relationId;
    }

    /**
     * full constructor
     */
    public Login(String phoneNum, String password, String inviterCode, int type, Long relationId,
                 String salt, String recommCode, Date lastLoginTime, String token, String createdBy,
                 Date createdAt, String changedBy, Date changedAt, int regType, Date lastPwdModify) {
        this.phoneNum = phoneNum;
        this.password = password;
        this.inviterCode = inviterCode;
        this.type = type;
        this.relationId = relationId;
        this.salt = salt;
        this.recommCode = recommCode;
        this.lastLoginTime = lastLoginTime;
        this.token = token;
        this.createdBy = createdBy;
        this.createdAt = createdAt;
        this.changedBy = changedBy;
        this.changedAt = changedAt;
        this.regType = regType;
        this.lastPwdModify = lastPwdModify;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "phone_num", nullable = false, length = 11)
    public String getPhoneNum() {
        return this.phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    @Column(name = "password", nullable = false, length = 50)
    public String getPassword() {
        return this.password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Column(name = "inviter_code", length = 10)
    public String getInviterCode() {
        return this.inviterCode;
    }

    public void setInviterCode(String inviterCode) {
        this.inviterCode = inviterCode;
    }

    @Column(name = "type")
    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    @Column(name = "relation_id")
    public Long getRelationId() {
        return this.relationId;
    }

    public void setRelationId(Long relationId) {
        this.relationId = relationId;
    }

    @Column(name = "salt")
    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    @Column(name = "recomm_code")
    public String getRecommCode() {
        return recommCode;
    }

    public void setRecommCode(String recommCode) {
        this.recommCode = recommCode;
    }

    @Column(name = "last_login_time")
    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    @Column(name = "token", length = 20)
    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Column(name = "created_by")
    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    @Column(name = "created_at", length = 19)
    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Column(name = "changed_by")
    public String getChangedBy() {
        return changedBy;
    }

    public void setChangedBy(String changedBy) {
        this.changedBy = changedBy;
    }

    @Column(name = "changed_at", length = 19)
    public Date getChangedAt() {
        return changedAt;
    }

    public void setChangedAt(Date changedAt) {
        this.changedAt = changedAt;
    }

    @Column(name = "reg_type")
    public int getRegType() {
        return regType;
    }

    public void setRegType(int regType) {
        this.regType = regType;
    }

    @Column(name = "device_sn")
    public String getDeviceSN() {
        return deviceSN;
    }

    public void setDeviceSN(String deviceSN) {
        this.deviceSN = deviceSN;
    }

    @Column(name = "model")
    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    @Column(name = "ip")
    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @Column(name = "login_addr")
    public String getLoginAddr() {
        return loginAddr;
    }

    public void setLoginAddr(String loginAddr) {
        this.loginAddr = loginAddr;
    }

    @Column(name = "last_pwd_modify")
    public Date getLastPwdModify() {
        return lastPwdModify;
    }

    public void setLastPwdModify(Date lastPwdModify) {
        this.lastPwdModify = lastPwdModify;
    }
}